package callbackExample2;

public class AnyClass {
    
    private final Callback mainClass;
    
    public AnyClass(Callback mClass){
        mainClass = mClass;
    }
    
    public void calledFromMain(){
        //Do somthing...
        
        //call back main
        mainClass.callback();
    }
}